/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package control;

import comm.Messenger;

/**
 *
 * @author dheath
 */
public class Angvel implements TankAction
{

    private double value;
    private double error;

    public Angvel(double value, double error)
    {
        this.value = value;
        this.error = error;
    }

    public Angvel(double value)
    {
        this.value = value;
        this.error = 0;
    }

    public void performAction(Messenger msgr, int botId)
    {
        String resp = msgr.sendCommand("angvel " + botId + " " + value);
        while (resp == null)
        {
            resp = msgr.sendCommand("angvel " + botId + " " + value);
        }
    }

    public double getError()
    {
        return error;
    }
}
